#ifndef _EXTENDED_SDC_PARSER_H
#define _EXTENDED_SDC_PARSER_H


#include <map>
#include <cassert>
#include <limits>

#include "parser_helper.h"
#include "circuitgraph.h"
#include "extendedlibparser.h"

struct DriverInfo {

        std::string driverSize ;
        std::string dirverPin ;
        double inputTransFall ;
        double inputTransRise ;
};

typedef struct clock_info_{
        string clockName;
        string clockPort;
        double period;
}clock_info;

typedef struct driver_info_{
        //string inPortName;
        string driverSize;
        string driverPin;
        double inputTransitionFall;
        double inputTransitionRise;
        double maxCap;
        double cap;
}driver_info;

class ExtendedSdcParser:public SdcParser
{
  public:
  ExtendedSdcParser(std::string filename): SdcParser (filename) {}
        void readSdcFile () ;
        void clearDriverInfo(std::string driver_name);
        //since it is single clock dormain
        clock_info clk_info;

        void updateOutputCap (CircuitGraph&) ;
        void readInputDelays () ;
        void readInputDrivers () ;
        void readOutputDelays () ;
        void readOutputLoads () ;
                
 	std::map <std::string, double> inputs_delay ;
        std::map <std::string, double> outputs_delay ;
        std::map <std::string, double> outputs_load ;
        void updateInputTime (CircuitGraph&, ExtendedLibParser&) ;
        void updateSequentialTime(CircuitGraph&, ExtendedLibParser& ) ;
                
        std::map<std::string, double>           inputDelays ; 
        std::map<std::string, DriverInfo>       inputDrivers ;
        std::map<std::string, double>           outputDelays ;
        std::map<std::string, double>           outputLoads ;

};

#include "extendedsdcparser.hpp"

#endif

